using System;
using System.Collections.Generic;
using System.Text;
using FactoryPattern.Domain;

namespace FactoryPattern.Factories
{
    /// <summary>
    /// This is a valid implementation of a Factory, but this could become ugly if we have a lot of classes to initialize,
    /// or there is a lot of configuration that needs to be done before returning a Suit. To Solve this problem we could use the Reflected or Inherited 
    /// example.
    /// </summary>
    public sealed class SuitFactoryLogical
    {
        public static Suit CreateSuit(SuitType suitType)
        {
            Suit suit = null;
            if (suitType == SuitType.Armani)
                suit = new Armani();
            else if (suitType == SuitType.StripedBusinessSuit)
                suit = new StripedBusinessSuit();
            else if (suitType == SuitType.PlaidBusinessSuit)
                suit = new PlaidBusinessSuit();
            else if (suitType == SuitType.GolfSuit)
                suit = new GolfSuit();
            else if (suitType == SuitType.MotorcycleSuit)
                suit = new MotorcycleSuit();
            else if (suitType == SuitType.JoggingSuit)
                suit = new JoggingSuit();
            else if (suitType == SuitType.SolidBusinessSuit)
                suit = new SolidBusinessSuit();
            else if (suitType == SuitType.TennisSuit)
                suit = new TennisSuit();
            else if (suitType == SuitType.NewSuit)
                suit = new Armani();
           
            return suit;

        }
    }
}